﻿Public Class clsUuTien
    Public Shared Function Them(ByVal MaDTUT As String, ByVal TenDTUT As String) As Boolean
        Return db.Query("Insert into DTUT values ('" & MaDTUT & "',N'" & TenDTUT & "')")

    End Function
    Public Shared Function DSUT() As DataTable
        Return db.QueryTable("Select * from DTUT")
    End Function
    Public Shared Function Xoa(ByVal MaDTUT As String) As Boolean
        Return db.Query("delete from DTUT where MaDTUT ='" & MaDTUT & "'")
    End Function
    Public Shared Function Sua(ByVal MaDTUT As String, ByVal TenDTUT As String) As Boolean
        Return db.Query("update DTUT set TenDTUT =N'" + TenDTUT + "' where MaDTUT ='" + MaDTUT + "'")
    End Function
    Public Shared Function TimKiem(ByVal tukhoa As String) As DataTable
        Return db.QueryTable("select * from DTUT where MaDTUT like '%" & tukhoa & "%' or TenDTUT like N'%" & tukhoa & "%'")

    End Function
End Class


